<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" href="../../codebase/webix.css" type="text/css" media="screen" charset="utf-8">
		<script src="../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>
		<style>
            body{
                background: #faf6ed;
            }
			#areaA, #areaB{
				margin: 50px;
				width:700px; height:110px;
			}
		</style>
		<title>Basic Menu</title>
	</head>
	<body>

		<div id="areaA">
			
		</div>
		<br><hr><br>
		<div id="areaB">
			
		</div>

		<script type="text/javascript" charset="utf-8">

			webix.ui({
				container:"areaA",
				view:"menu",
                data:[
					{ id:"1",value:"Translate...", submenu:[
						"English", 
						{ value:"Slavic...", submenu:[
							"Belarusian", "Russian", "Ukrainian"
						]},
						"German"
					]},
					{ id:"2",value:"Post...", submenu:[ "Facebook", "Google+", "Twitter" ]},
					{ id:"3",value:"Info" }
				],
				on:{
					onMenuItemClick:function(id){
						webix.message("Click: "+this.getMenuItem(id).value);
					}
				},
                type:{
                    subsign:true
                }
			});	

			webix.ui({
				container:"areaB",
                view:"menu",
				width:150,
				layout:"y",
				subMenuPos:"right",
				data:[
					{ value:"Translate...", submenu:[ 
						"English", 
						{ value:"Slavic...", submenu:[
							"Belarusian", "Russian", "Ukrainian"
						]},
						"German"
					]},
					{ value:"Post...", submenu:[ "Facebook", "Google+", "Twitter" ]},
					{ $template:"Separator" },
					{ value:"Info" }
				],
				on:{
					onMenuItemClick:function(id){
						webix.message("Click: "+this.getMenuItem(id).value);
					}
				}
			});	

			
		</script>
	</body>
</html>
